﻿@using Google.Apis.YouTube.v3;
@using Google.Apis.YouTube.v3.Data;
@{
    ViewBag.Title = "Index";
    List<SearchResult> lstVideos = (List<SearchResult>)ViewData["lstVideos"];
}

<h2>Index</h2>

<div id="divVideos">
    @{
        if (lstVideos.Any())
        {
            int enumerador = 1;

            foreach (SearchResult objS in lstVideos)
            {
                if (objS != null)
                {
                    <div style="width:100%; height:120px;">
                        <div style="float:left; width:5%; padding-right:5px;"><input type="checkbox" name="rbVideo" /></div>
                        <div style="float:left; width:5%; padding-right:5px;">@enumerador</div>
                        <div style="float:left; width:30%; padding-right:5px;"><img alt="" src="@objS.Snippet.Thumbnails.Default.Url" width="90" height="90" /></div>
                        <div style="float:left; width:50%; padding-right:5px;">@objS.Snippet.Title</div>
                    </div><br />
                }

                enumerador++;
            }
        }
    }
</div>